package com.yourenbang.lingyun.transaction.web.domain.po.klks;

import com.alibaba.fastjson.annotation.JSONField;
import com.yourenbang.lingyun.core.util.json.ToJSON;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
public class AppUserActivate implements Serializable, ToJSON {

    /** 类型 1:返现 */
    public static final String TYPE_AMT = "1";
    /** 类型 2:积分 */
    public static final String TYPE_POINT = "2";

    /** 目标用户角色 1:商户 */
    public static final String TOROLEID_MER = "1";
    /** 目标用户角色 2:盟友 */
    public static final String TOROLEID_ALLY = "2";

    /** 状态 0:不冻结 */
    public static final Integer status_0 = 0;
    /** 状态 10:冻结 */
    public static final Integer status_10 = 10;
    /** 状态 20:解冻 */
    public static final Integer status_20 = 20;
    /** 状态 30: 失效 */
    public static final Integer status_30 = 30;
    /** 状态 40: 未返现 */
    public static final Integer status_40 = 40;     //此状态下，记录返现给谁，未返现（电签用）

    private String id;

    private String fromUserId;          //来源用户

    private String toUserId;            //目标用户

    private String type;                //类型 1:返现 2:积分

    private BigDecimal amt;             //金额

    private BigDecimal freezeAmt;       //冻结金额

    private String toRoleId;            //目标用户角色 1:商户 2:盟友

    private String productType;         //产品类型

    private Integer status;             //0:不冻结 10:冻结  20:解冻 30: 失效

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    private Integer version;

    private BigDecimal allowanceAmt;        //补贴金额

    private BigDecimal allowanceFreezeAmt;  //补贴冻结金额

    private String marketStatus;

}
